using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using QuoteTree;

public partial class reload_trees : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        this.Response.Cache.SetCacheability(HttpCacheability.NoCache);

        ArrayList alltrees = new ArrayList();

        string[] dirs = Directory.GetDirectories(Server.MapPath("Quotes"));

        try
        {
            foreach (string s in dirs)
            {
                //if is a valid tree....need to be implemented yet...
                alltrees.Add(new QTree(@s));
            }
            this.Application["alltrees"] = alltrees;
            this.Response.Write("ok");
        }
        catch (Exception)
        {
            this.Response.Write("error");
        }

    }
}
